# -*- coding: utf-8 -*-#
#-------------------------------------------------------------------------------
# 建立者:        黄周云  
# Name:         test02
# Description: 例17.2
# Author:       ASUS
# Date:         2019/5/11
#-------------------------------------------------------------------------------


import _thread as thread
from time import sleep,ctime
def fun1():
    print('开始运行fun1：',ctime())
    #休眠4秒
    sleep(4)
    print('fun1运行结束：',ctime())

def fun2():
    print('开始运行fun2：',ctime())
    #休眠2秒
    sleep(2)
    print('fun2运行结束：',ctime())

def main():
    print('开始运行时间：',ctime())
    thread.start_new_thread(fun1,())
    thread.start_new_thread(fun2,())
    sleep(6)
    print('结束运行时间：',ctime())

if __name__=='__main__':
    main()



